import React from 'react'
import { useMarketplaceData } from 'redux/hooks'

interface LogoProps {
  className?: string
  onClick?: React.MouseEventHandler<SVGSVGElement | HTMLImageElement>
}

const LogoTernoa = ({ className, onClick }: LogoProps) => {
  const { logo } = useMarketplaceData()

  return logo ? (
    // eslint-disable-next-line @next/next/no-img-element
    <img src={logo} alt="Marketplace Logo" className={className} onClick={onClick} />
  ) : (
    <svg xmlns="http://www.w3.org/2000/svg" className={className} onClick={onClick} viewBox="0 0 319 91" fill="none">
      <path
        d="M89.632 48.72C87.584 48.72 85.696 48.368 83.968 47.664C82.272 46.928 80.816 45.904 79.6 44.592C78.416 43.248 77.6 41.648 77.152 39.792L83.824 38.352C84.24 39.664 84.96 40.688 85.984 41.424C87.04 42.16 88.288 42.528 89.728 42.528C90.752 42.528 91.648 42.352 92.416 42C93.216 41.616 93.824 41.104 94.24 40.464C94.688 39.824 94.912 39.088 94.912 38.256C94.912 37.2 94.512 36.352 93.712 35.712C92.912 35.04 91.616 34.496 89.824 34.08L88.288 33.744C84.768 32.976 82.176 31.744 80.512 30.048C78.848 28.32 78.016 26.224 78.016 23.76C78.016 22.224 78.32 20.816 78.928 19.536C79.536 18.256 80.368 17.152 81.424 16.224C82.512 15.264 83.776 14.528 85.216 14.016C86.656 13.472 88.208 13.2 89.872 13.2C91.76 13.2 93.52 13.552 95.152 14.256C96.784 14.96 98.16 15.968 99.28 17.28C100.4 18.592 101.152 20.144 101.536 21.936L94.96 23.376C94.576 22.096 93.904 21.12 92.944 20.448C92.016 19.744 90.928 19.392 89.68 19.392C88.816 19.392 88.032 19.568 87.328 19.92C86.656 20.24 86.112 20.704 85.696 21.312C85.312 21.888 85.12 22.544 85.12 23.28C85.12 24.4 85.552 25.264 86.416 25.872C87.28 26.448 88.56 26.928 90.256 27.312L91.792 27.648C95.28 28.416 97.856 29.632 99.52 31.296C101.216 32.96 102.064 35.088 102.064 37.68C102.064 39.312 101.744 40.8 101.104 42.144C100.496 43.488 99.632 44.656 98.512 45.648C97.392 46.64 96.08 47.408 94.576 47.952C93.072 48.464 91.424 48.72 89.632 48.72ZM118.907 48.72C117.019 48.72 115.275 48.4 113.675 47.76C112.107 47.088 110.747 46.16 109.595 44.976C108.443 43.76 107.547 42.336 106.907 40.704C106.267 39.04 105.947 37.232 105.947 35.28C105.947 33.392 106.267 31.632 106.907 30C107.547 28.368 108.427 26.96 109.547 25.776C110.699 24.56 112.043 23.616 113.579 22.944C115.115 22.272 116.779 21.936 118.571 21.936C120.427 21.936 122.107 22.256 123.611 22.896C125.147 23.536 126.459 24.448 127.547 25.632C128.635 26.816 129.467 28.224 130.043 29.856C130.651 31.488 130.955 33.312 130.955 35.328V37.008H112.763C113.051 38.896 113.739 40.384 114.827 41.472C115.915 42.528 117.291 43.056 118.955 43.056C120.107 43.056 121.147 42.784 122.075 42.24C123.035 41.696 123.819 40.912 124.427 39.888L130.427 41.808C129.851 43.248 128.987 44.48 127.835 45.504C126.683 46.528 125.339 47.328 123.803 47.904C122.267 48.448 120.635 48.72 118.907 48.72ZM118.571 27.12C117.099 27.12 115.851 27.6 114.827 28.56C113.835 29.52 113.179 30.832 112.859 32.496H124.043C123.787 30.832 123.163 29.52 122.171 28.56C121.211 27.6 120.011 27.12 118.571 27.12ZM147.12 48.72C145.296 48.72 143.6 48.4 142.032 47.76C140.496 47.088 139.152 46.16 138 44.976C136.88 43.792 136 42.4 135.36 40.8C134.72 39.168 134.4 37.408 134.4 35.52C134.4 33.6 134.72 31.824 135.36 30.192C136.032 28.528 136.944 27.088 138.096 25.872C139.28 24.624 140.656 23.664 142.224 22.992C143.792 22.288 145.488 21.936 147.312 21.936C149.136 21.936 150.816 22.288 152.352 22.992C153.888 23.664 155.184 24.624 156.24 25.872C157.328 27.12 158.08 28.576 158.496 30.24L152.112 31.488C151.632 30.4 150.96 29.552 150.096 28.944C149.232 28.304 148.256 27.984 147.168 27.984C146.016 27.984 144.992 28.304 144.096 28.944C143.232 29.584 142.544 30.48 142.032 31.632C141.52 32.752 141.264 34.016 141.264 35.424C141.264 36.832 141.504 38.08 141.984 39.168C142.496 40.256 143.2 41.12 144.096 41.76C144.992 42.368 146.016 42.672 147.168 42.672C148.32 42.672 149.36 42.368 150.288 41.76C151.216 41.152 151.904 40.288 152.352 39.168L158.736 40.416C158.32 42.112 157.536 43.584 156.384 44.832C155.264 46.08 153.904 47.04 152.304 47.712C150.704 48.384 148.976 48.72 147.12 48.72ZM162.782 48V22.656H168.974L169.214 26.496C169.854 25.152 170.718 24.128 171.806 23.424C172.894 22.688 174.174 22.32 175.646 22.32C176.094 22.32 176.542 22.368 176.99 22.464C177.438 22.528 177.838 22.624 178.19 22.752L177.47 29.376C177.118 29.248 176.75 29.168 176.366 29.136C176.014 29.072 175.646 29.04 175.262 29.04C173.406 29.04 171.982 29.616 170.99 30.768C169.998 31.888 169.502 33.488 169.502 35.568V48H162.782ZM193.204 48.72C191.316 48.72 189.572 48.4 187.972 47.76C186.404 47.088 185.044 46.16 183.892 44.976C182.74 43.76 181.844 42.336 181.204 40.704C180.564 39.04 180.244 37.232 180.244 35.28C180.244 33.392 180.564 31.632 181.204 30C181.844 28.368 182.724 26.96 183.844 25.776C184.996 24.56 186.34 23.616 187.876 22.944C189.412 22.272 191.076 21.936 192.868 21.936C194.724 21.936 196.404 22.256 197.908 22.896C199.444 23.536 200.756 24.448 201.844 25.632C202.932 26.816 203.764 28.224 204.34 29.856C204.948 31.488 205.252 33.312 205.252 35.328V37.008H187.06C187.348 38.896 188.036 40.384 189.124 41.472C190.212 42.528 191.588 43.056 193.252 43.056C194.404 43.056 195.444 42.784 196.372 42.24C197.332 41.696 198.116 40.912 198.724 39.888L204.724 41.808C204.148 43.248 203.284 44.48 202.132 45.504C200.98 46.528 199.636 47.328 198.1 47.904C196.564 48.448 194.932 48.72 193.204 48.72ZM192.868 27.12C191.396 27.12 190.148 27.6 189.124 28.56C188.132 29.52 187.476 30.832 187.156 32.496H198.34C198.084 30.832 197.46 29.52 196.468 28.56C195.508 27.6 194.308 27.12 192.868 27.12ZM220.133 48.72C218.373 48.72 216.853 48.384 215.573 47.712C214.325 47.008 213.349 46 212.645 44.688C211.973 43.376 211.637 41.776 211.637 39.888V28.08H207.317V22.656H211.637V14.016H218.357V22.656H225.269V28.08H218.357V39.072C218.357 40.288 218.613 41.232 219.125 41.904C219.637 42.544 220.421 42.864 221.477 42.864C222.021 42.864 222.597 42.784 223.205 42.624C223.845 42.464 224.453 42.256 225.029 42L226.229 47.04C225.397 47.552 224.469 47.952 223.445 48.24C222.421 48.56 221.317 48.72 220.133 48.72ZM230.62 48V13.92H236.812L252.604 36.48V13.92H259.516V48H253.324L237.532 25.44V48H230.62ZM265.776 48V13.92H286.656V20.16H272.736V28.56H285.12V34.752H272.736V48H265.776ZM300.006 48V20.256H290.406V13.92H316.758V20.256H307.158V48H300.006Z"
        fill="white"
      />
      <path
        d="M79.302 73V57.376H81.717V63.613C82.109 63.011 82.62 62.542 83.25 62.206C83.88 61.87 84.573 61.702 85.329 61.702C86.057 61.702 86.729 61.849 87.345 62.143C87.975 62.437 88.521 62.843 88.983 63.361C89.445 63.879 89.802 64.488 90.054 65.188C90.32 65.888 90.453 66.644 90.453 67.456C90.453 68.282 90.32 69.052 90.054 69.766C89.788 70.48 89.417 71.103 88.941 71.635C88.465 72.167 87.905 72.58 87.261 72.874C86.631 73.168 85.945 73.315 85.203 73.315C84.433 73.315 83.733 73.147 83.103 72.811C82.487 72.475 81.99 71.999 81.612 71.383L81.507 73H79.302ZM84.825 71.131C85.427 71.131 85.966 70.977 86.442 70.669C86.918 70.347 87.289 69.913 87.555 69.367C87.835 68.821 87.975 68.198 87.975 67.498C87.975 66.798 87.835 66.182 87.555 65.65C87.289 65.104 86.918 64.677 86.442 64.369C85.966 64.047 85.427 63.886 84.825 63.886C84.223 63.886 83.684 64.047 83.208 64.369C82.732 64.677 82.354 65.104 82.074 65.65C81.808 66.182 81.675 66.798 81.675 67.498C81.675 68.198 81.808 68.821 82.074 69.367C82.354 69.913 82.732 70.347 83.208 70.669C83.684 70.977 84.223 71.131 84.825 71.131ZM93.7124 77.368C93.3624 77.368 93.0334 77.333 92.7254 77.263C92.4314 77.193 92.1444 77.081 91.8644 76.927L92.3894 75.016C92.5434 75.086 92.7184 75.142 92.9144 75.184C93.1104 75.24 93.2994 75.268 93.4814 75.268C93.9014 75.268 94.2654 75.149 94.5734 74.911C94.8954 74.673 95.1614 74.288 95.3714 73.756L95.7074 72.895L91.2344 62.017H93.8804L96.8414 70.228L99.5294 62.017H102.091L97.4294 74.323C97.0234 75.373 96.5124 76.143 95.8964 76.633C95.2944 77.123 94.5664 77.368 93.7124 77.368ZM112.692 73.315C111.586 73.315 110.718 73 110.088 72.37C109.458 71.726 109.143 70.809 109.143 69.619V63.97H107.211V62.017H109.143V58.3H111.558V62.017H114.75V63.97H111.558V69.367C111.558 69.955 111.677 70.41 111.915 70.732C112.167 71.04 112.531 71.194 113.007 71.194C113.259 71.194 113.532 71.159 113.826 71.089C114.12 71.005 114.393 70.893 114.645 70.753L115.191 72.58C114.869 72.804 114.491 72.979 114.057 73.105C113.637 73.245 113.182 73.315 112.692 73.315ZM121.996 73.315C121.184 73.315 120.435 73.175 119.749 72.895C119.077 72.601 118.489 72.195 117.985 71.677C117.481 71.159 117.089 70.55 116.809 69.85C116.543 69.136 116.41 68.352 116.41 67.498C116.41 66.672 116.543 65.909 116.809 65.209C117.089 64.509 117.467 63.9 117.943 63.382C118.433 62.85 119.007 62.437 119.665 62.143C120.323 61.849 121.037 61.702 121.807 61.702C122.577 61.702 123.277 61.842 123.907 62.122C124.551 62.388 125.104 62.773 125.566 63.277C126.042 63.781 126.406 64.383 126.658 65.083C126.91 65.769 127.036 66.532 127.036 67.372V68.086H118.909C118.979 68.73 119.147 69.29 119.413 69.766C119.693 70.228 120.05 70.585 120.484 70.837C120.918 71.089 121.422 71.215 121.996 71.215C123.144 71.215 124.04 70.704 124.684 69.682L126.805 70.501C126.553 71.075 126.182 71.579 125.692 72.013C125.216 72.433 124.656 72.755 124.012 72.979C123.382 73.203 122.71 73.315 121.996 73.315ZM121.807 63.655C121.317 63.655 120.876 63.767 120.484 63.991C120.106 64.215 119.784 64.53 119.518 64.936C119.252 65.342 119.07 65.818 118.972 66.364H124.516C124.432 65.818 124.271 65.342 124.033 64.936C123.795 64.53 123.48 64.215 123.088 63.991C122.71 63.767 122.283 63.655 121.807 63.655ZM129.095 73V62.017H131.3L131.405 63.823C131.685 63.207 132.07 62.731 132.56 62.395C133.064 62.045 133.652 61.87 134.324 61.87C134.534 61.87 134.737 61.884 134.933 61.912C135.129 61.94 135.304 61.989 135.458 62.059L135.185 64.411C135.031 64.355 134.87 64.32 134.702 64.306C134.534 64.278 134.366 64.264 134.198 64.264C133.358 64.264 132.7 64.544 132.224 65.104C131.748 65.664 131.51 66.441 131.51 67.435V73H129.095ZM137.237 73V62.017H139.442L139.526 63.529C139.848 62.969 140.296 62.528 140.87 62.206C141.458 61.87 142.13 61.702 142.886 61.702C143.712 61.702 144.426 61.898 145.028 62.29C145.644 62.682 146.12 63.235 146.456 63.949C146.792 64.663 146.96 65.503 146.96 66.469V73H144.545V66.742C144.545 65.846 144.342 65.146 143.936 64.642C143.544 64.138 142.991 63.886 142.277 63.886C141.773 63.886 141.318 64.005 140.912 64.243C140.52 64.481 140.212 64.803 139.988 65.209C139.764 65.615 139.652 66.084 139.652 66.616V73H137.237ZM154.665 73.315C153.867 73.315 153.125 73.175 152.439 72.895C151.767 72.601 151.179 72.195 150.675 71.677C150.171 71.145 149.779 70.529 149.499 69.829C149.219 69.115 149.079 68.338 149.079 67.498C149.079 66.672 149.219 65.909 149.499 65.209C149.779 64.495 150.171 63.879 150.675 63.361C151.193 62.829 151.795 62.423 152.481 62.143C153.181 61.849 153.937 61.702 154.749 61.702C155.547 61.702 156.282 61.849 156.954 62.143C157.64 62.423 158.235 62.829 158.739 63.361C159.243 63.879 159.635 64.488 159.915 65.188C160.195 65.888 160.335 66.658 160.335 67.498C160.335 68.338 160.195 69.115 159.915 69.829C159.635 70.529 159.236 71.145 158.718 71.677C158.214 72.195 157.612 72.601 156.912 72.895C156.226 73.175 155.477 73.315 154.665 73.315ZM154.707 71.131C155.309 71.131 155.848 70.977 156.324 70.669C156.8 70.347 157.171 69.913 157.437 69.367C157.717 68.821 157.857 68.198 157.857 67.498C157.857 66.798 157.717 66.182 157.437 65.65C157.171 65.104 156.8 64.677 156.324 64.369C155.848 64.047 155.309 63.886 154.707 63.886C154.105 63.886 153.566 64.047 153.09 64.369C152.614 64.677 152.236 65.104 151.956 65.65C151.69 66.182 151.557 66.798 151.557 67.498C151.557 68.198 151.69 68.821 151.956 69.367C152.236 69.913 152.614 70.347 153.09 70.669C153.566 70.977 154.105 71.131 154.707 71.131ZM165.821 73.315C165.261 73.315 164.743 73.231 164.267 73.063C163.805 72.895 163.399 72.657 163.049 72.349C162.699 72.041 162.426 71.677 162.23 71.257C162.034 70.837 161.936 70.375 161.936 69.871C161.936 69.171 162.118 68.562 162.482 68.044C162.86 67.512 163.385 67.099 164.057 66.805C164.729 66.511 165.513 66.364 166.409 66.364C166.899 66.364 167.368 66.413 167.816 66.511C168.264 66.595 168.691 66.721 169.097 66.889V66.196C169.097 65.706 169.006 65.279 168.824 64.915C168.642 64.537 168.383 64.243 168.047 64.033C167.711 63.823 167.305 63.718 166.829 63.718C166.325 63.718 165.87 63.851 165.464 64.117C165.058 64.383 164.757 64.754 164.561 65.23L162.335 64.726C162.503 64.11 162.804 63.578 163.238 63.13C163.686 62.682 164.218 62.332 164.834 62.08C165.464 61.828 166.143 61.702 166.871 61.702C167.557 61.702 168.18 61.814 168.74 62.038C169.314 62.262 169.804 62.577 170.21 62.983C170.616 63.389 170.931 63.872 171.155 64.432C171.379 64.992 171.491 65.615 171.491 66.301V73H169.286L169.202 71.551C168.908 72.083 168.467 72.51 167.879 72.832C167.291 73.154 166.605 73.315 165.821 73.315ZM164.372 69.766C164.372 70.074 164.456 70.354 164.624 70.606C164.792 70.844 165.023 71.033 165.317 71.173C165.625 71.313 165.982 71.383 166.388 71.383C166.906 71.383 167.368 71.271 167.774 71.047C168.18 70.823 168.502 70.522 168.74 70.144C168.978 69.752 169.097 69.311 169.097 68.821V68.569C168.733 68.415 168.355 68.296 167.963 68.212C167.585 68.114 167.193 68.065 166.787 68.065C166.059 68.065 165.471 68.219 165.023 68.527C164.589 68.835 164.372 69.248 164.372 69.766Z"
        fill="white"
      />
      <path
        d="M250 69C250 60.7157 256.716 54 265 54H298C306.284 54 313 60.7157 313 69C313 77.2843 306.284 84 298 84H265C256.716 84 250 77.2843 250 69Z"
        fill="#7417EA"
        fillOpacity="0.1"
      />
      <path
        d="M263.857 74.5V63.8359H267.592C268.886 63.8359 269.868 64.085 270.537 64.583C271.206 65.0762 271.54 65.8013 271.54 66.7583C271.54 67.2808 271.406 67.7422 271.137 68.1426C270.869 68.5381 270.495 68.8286 270.017 69.0142C270.564 69.1509 270.993 69.4268 271.306 69.8418C271.623 70.2568 271.782 70.7646 271.782 71.3652C271.782 72.3906 271.455 73.167 270.8 73.6943C270.146 74.2217 269.214 74.4902 268.003 74.5H263.857ZM266.054 69.8564V72.7349H267.937C268.454 72.7349 268.857 72.6128 269.145 72.3687C269.438 72.1196 269.585 71.7778 269.585 71.3433C269.585 70.3667 269.079 69.8711 268.069 69.8564H266.054ZM266.054 68.3037H267.68C268.789 68.2842 269.343 67.8423 269.343 66.978C269.343 66.4946 269.201 66.1479 268.918 65.938C268.64 65.7231 268.198 65.6157 267.592 65.6157H266.054V68.3037ZM280.028 69.8784H275.809V72.7349H280.761V74.5H273.612V63.8359H280.746V65.6157H275.809V68.1572H280.028V69.8784ZM290.399 65.6157H287.132V74.5H284.935V65.6157H281.712V63.8359H290.399V65.6157ZM296.975 72.3027H293.122L292.39 74.5H290.054L294.023 63.8359H296.059L300.051 74.5H297.715L296.975 72.3027ZM293.716 70.5229H296.382L295.041 66.5312L293.716 70.5229Z"
        fill="#F7F7F7"
      />
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M16.7237 14.5165L39.5679 12.4085C46.2524 11.7917 52.1787 16.6297 52.8049 23.2144L57.5127 72.7239C59.0755 71.2681 59.9478 69.1117 59.9478 66.6929V16.7972C59.9478 12.3882 56.3195 8.81392 51.8437 8.81392H24.4923C20.821 8.81392 17.7199 11.2187 16.7237 14.5165ZM57.0974 77.6819C55.718 82.2179 51.6621 85.7023 46.582 86.1711L19.1172 88.7054C12.4328 89.3223 6.50642 84.4843 5.88027 77.8995L1.13364 27.9824C0.50749 21.3977 5.41868 15.5597 12.1031 14.9429L12.4866 14.9075C13.4065 9.19178 18.4314 4.82227 24.4923 4.82227H51.8437C58.5574 4.82227 63.9999 10.1836 63.9999 16.7972V66.6929C63.9999 71.634 61.281 75.86 57.0974 77.6819ZM5.16804 27.6102C4.75061 23.2203 8.02473 19.3283 12.481 18.9171L39.9459 16.3828C44.4021 15.9715 48.353 19.1969 48.7705 23.5867L53.5171 73.5038C53.9345 77.8936 50.6604 81.7856 46.2041 82.1968L18.7393 84.7312C14.283 85.1424 10.3321 81.9171 9.91467 77.5272L5.16804 27.6102Z"
        fill="#0C0B0B"
      />
      <path
        d="M41.2601 48.0712C41.376 50.056 39.8052 51.7534 37.7886 51.9394L35.0567 52.1914C34.8223 52.2131 34.5945 52.2798 34.3863 52.3879C34.1782 52.496 33.9938 52.6433 33.8436 52.8214C33.6934 52.9995 33.5804 53.2049 33.5111 53.4259C33.4418 53.6468 33.4175 53.8789 33.4396 54.109L34.4779 65.0306C34.6677 67.0269 33.2387 68.8832 31.2081 69.1182C30.2807 69.2273 29.3455 68.9911 28.5872 68.456C27.829 67.9209 27.3029 67.126 27.1128 66.2282C27.0845 66.094 27.0635 65.9584 27.05 65.8221L26.0024 54.8025C25.958 54.3356 25.7266 53.9053 25.3589 53.6062C24.9913 53.307 24.5176 53.1637 24.0421 53.2076L21.1439 53.4749C20.1701 53.5433 19.208 53.2346 18.4636 52.615C17.7191 51.9954 17.2515 51.1141 17.1608 50.1598C17.07 49.2055 17.3635 48.254 17.9782 47.5091C18.5929 46.7641 19.4801 46.2848 20.4498 46.1738L37.1832 44.6302C37.683 44.5842 38.187 44.6377 38.6651 44.7872C39.1432 44.9367 39.5858 45.1792 39.9662 45.5004C40.3467 45.8215 40.6574 46.2146 40.8797 46.6563C41.102 47.098 41.2313 47.5792 41.2601 48.0712Z"
        fill="black"
      />
      <path
        d="M28.3209 42.0281C31.053 41.776 33.0513 39.2951 32.7843 36.4867C32.5174 33.6784 30.0862 31.6061 27.3541 31.8581C24.622 32.1101 22.6237 34.5911 22.8906 37.3994C23.1576 40.2078 25.5888 42.2801 28.3209 42.0281Z"
        fill="black"
      />
    </svg>
  )
}

export default LogoTernoa
